package io.easyspring.invitation.core.events;

import io.easyspring.invitation.core.support.EasyInvitation;
import lombok.Getter;
import org.springframework.context.ApplicationEvent;

/**
 * 邀请信息发送成功事件
 *
 * @author summer
 * @version 2.0.0-RELEASE
 * DateTime 2019-06-22 16:13
 */
@Getter
public class InvitationSendSuccessEvent<T extends EasyInvitation> extends ApplicationEvent {

    private static final long serialVersionUID = 7258464702337830628L;

    /**
     * 邀请信息对象
     */
    private T invitation;

    /**
     * 邀请信息发送成功事件构造器
     *
     * @param source 事件最初发生的对象本身
     * @param invitation 邀请信息对象
     * Author summer
     * Version 2.0.0-RELEASE
     * DateTime 2019-06-22 16:13
     */
    public InvitationSendSuccessEvent(Object source, T invitation) {
        super(source);
        this.invitation = invitation;
    }
}
